import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class TLetter extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', name: 'content', length: 2000 })
  content: string;

  // 0 | 1, 1为一封信显示的内容，列表只允许存在一个1
  @Column({ type: 'varchar', name: 'current' })
  current: string;

  @Column({ type: 'varchar', name: 'created_at' })
  createdAt: string;

  @Column({ type: 'varchar', name: 'updated_at' })
  updatedAt: string;
}
